#!/bin/bash

cpu_used=`vmstat | awk 'NR==3{print "CPU利用率："(100-$(NF-2))"%"}'`

cpu_average=`uptime | awk '{print "CPU负载: " $(NF-2),$(NF-1),$NF}'`

mem_used=`free -h |awk 'NR==2{print "内存利用率: "int(100-($NF/$2*100))"%"}'`

#disk_used=`df -hT |grep /$ | awk '{print "根目录利用率："$(NF-1)}'`

echo $cpu_used

echo $cpu_average

echo $mem_used

#echo $disk_used
